﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace RetrieveEntityDetails.Utility
{
    class FileSystemHelper
    {
        StreamWriter Writer;
        public string FileNameWithPath;

        public FileSystemHelper()
        {
                   
        }

        public bool Write(string Content)
        {
            try
            {
                Writer = new StreamWriter(FileNameWithPath, true);     
                Writer.WriteLine(Content);
                Writer.Close();
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }

        public bool Write(string Content, bool Append)
        {
            try
            {
                Writer = new StreamWriter(FileNameWithPath, Append);
                Writer.WriteLine(Content);
                Writer.Close();
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
    }
}
